{% extends "rings.html" %}

{% block title %}
  Ring {{ring.number}}
{% endblock title %}

{% block sub_breadcrumb %}
  <li class="active">
    <a href="/ring/{{ring.number}}">Ring {{ring.number}}</a>
  </li>
{% endblock %}

{% block content %}
<div class="row">
  <!--- Upcoming events --->
  <div class="span5">
    <h2>Upcoming events</h2><br>
    <ul class="nav nav-tabs nav-stacked">
    {% if future_events %}
    {% for event in future_events %}
      <a href="/event/{{event.shortcode}}">
      <div class="row">
        <div class="span1">
          <h4 class="ul-li-heading">{{event.shortcode}}</h4>
        </div>
        <div class="span3">
          <strong>{{event.event_type.name}}</strong><br>
          {{event.level.name}} - {{event.gender.name}} - {{event.age_group.name}}
        </div>
        <div class="span1">
          <span class="btn disabled">{{event.num_competitors}}</span>
        </div>
      </div></a>
      <hr />
    {% endfor %}
    {% else %}
      <h2>No more events</h2>
    {% endif %}
    </ul>
  </div>
  
  <!--- Finished events --->
  <div class="span5">
    <div class="row">
    <h2>Finished events</h2><br>
    </div>
    {% for event in previous_events %}
      <a href="/event/{{event.shortcode}}">
      <div class="row">
        <div class="span1">
          <h4 class="ul-li-heading">{{event.shortcode}}</h4>
        </div>
        <div class="span3">
          <strong>{{event.event_type.name}}</strong><br>
          {{event.level.name}} - {{event.gender.name}} - {{event.age_group.name}}
        </div>
        <div class="span1">
          <span class="btn disabled">{{event.num_competitors}}</span>
        </div>
      </div></a>
      <hr />
    {% empty %}
      <h2>No more events</h2>
    {% endfor %}
    </ul>
  </div>
</div>
{% endblock content %}